Verify Encrypted Counters (M/Chip 4)

Command:

Validate an encrypted counter that the issuer may optionally include in Issuer Application Data.

Notes:

Diagnostic data is produced by this command only if the HSM is in Authorised State. The issuer may include the following offline counters in Issuer Application data:

·         Offline Cumulative Transaction Amount (OCTA) (6 bytes).

·         Offline Consecutive Transaction Number (OCTN) (1 byte).

The issuer may optionally choose that these counters be encrypted. This command will validate the Encrypted Counter data and decrypt the counters.

 

Field

Length & Type

Details

COMMAND MESSAGE

Message Header

m A

(Subsequently returned to the Host unchanged).

Command Code

2 A

Value K0

Scheme-ID

1 N

Identifier for the Scheme:

0 = M/Chip 4

*MK-AC(LMK)

  

32H or

1A+32H

The Issuer Master Key for Application Cryptograms encrypted under Variant 1 of LMK pair 28-29.

  

PAN/PAN Sequence No

8B

Pre-formatted PAN/PAN Sequence No.

Branch/Height parameters

1N

0 = Branch factor 2; Tree Height 16

1 = Branch factor 4; Tree Height 8

Application Transaction Counter

2B

The ATC from the card. This is used for Session Key Generation.

Encrypted Counters

8B

The Encrypted Counter data, containing the OCTA and OCTN

End Message Delimiter

1C

Optional. Must be present if the message trailer is present. Value X’19

Message Trailer

NA

Optional. Maximum length 32 characters

 

Field

Length & Type

Details

RESPONSE MESSAGE

Message Header

MA

Will be returned to the Host unchanged

Response Code

2A

Value “K1”

Error Code

2N

00 – No error

01 – Encrypted Counter verification failed

10 – MK parity error

12 – No keys in user storage

13 – LMK parity error

15 – Error in input data

21 – Invalid user storage index

OCTA

6B

Offline Cumulated Transaction Amount

OCTN

1B

Offline Consecutive Transaction Number

End Message Delimiter

  

1C

Will only be present if present in the command message. Value X’19.

Message Trailer

n A

Will only be present if in the command message.

Maximum length 32 characters.